package com.htc.model.request;

public class OrderRequest extends PageRequest{

	private String tel;
	private Integer consumer_id;
	
	
	public String getTel() {
		return tel;
	}


	public void setTel(String tel) {
		this.tel = tel;
	}



	public Integer getConsumer_id() {
		return consumer_id;
	}


	public void setConsumer_id(Integer consumer_id) {
		this.consumer_id = consumer_id;
	}


	public String convertWhereStr() {
		StringBuffer bf = new StringBuffer("where 1=1 ");
		if(tel!=null&&tel.length()>0) {
			bf.append(" and tel = '"+tel+"'");
		}
		if(consumer_id!=null) {
			bf.append(" and oid in(select oid from orderitem where pid in(select pid from product where consumer_id='"+consumer_id+"'))");
		}
		return bf.toString();
		
	}
	
}
